/*
 * urcbmb.h
 * urcbmb is a Arduino communication library for RC communication with URC bidirectional module bus
 * Licensed for use under the terms of the GNU Lesser General Public License v2.1
 * based on TWI/I2C library for Wiring & Arduino Copyright (c) 2006 Nicholas Zambetti
 * V0.1 	12.06.2013
 * 12.06.2013, Gerhard Herrmann (ghhermi@gmail.com) , Munich, Germany
 * URC Project
 */
 
#ifndef URCBMB_H
#define URCBMB_H

#include "Arduino.h"

#define BUFFER_LENGTH 32

class urcbmb {
  private:
    unsigned char bmb_manufactor;
    unsigned char bmb_type;
    boolean bmb_measure;
    boolean bmb_master;
    unsigned char txBuffer[ BUFFER_LENGTH ];
    static void (*user_onServo)( unsigned char, unsigned int );
    static void (*user_onFunction)( unsigned char );
    static void onRequestService( void );
    static void onReceiveService( unsigned char*, int, boolean );
  public:
    urcbmb();
    void begin( unsigned char, unsigned char, boolean, boolean );
    void txServo( unsigned char, unsigned int );
    void txFunction( unsigned char );
    void onServo( void (*)( unsigned char, unsigned int ) );
    void onFunction( void (*)( unsigned char ) );
  
};
#endif